

/***
 * 泛型单例模式接口
 */

export default class Singleton {
    private static _instance: any = null

    static GetInstance<T>(): T {
        if (this._instance === null) {
            this._instance = new this()
        }
        return this._instance
    }
}


// export default class SingLeton{
//     private static _instance :any =null
//     static GetInstance<T>():T{
//         if(this._instance === null){
//             this._instance =new this()

//         }

//         return this._instance
//     }
// }

// //简单的单例模式